Optimal. Leaf size=26 \[ -\frac {b \log (\cos (e+f x))}{f}+\frac {a \log (\sin (e+f x))}{f} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.02, antiderivative size = 26, normalized size of antiderivative = 1.00, number of steps
used = 3, number of rules used = 2, integrand size = 19, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.105, Rules used = {3706, 3556}
\begin {gather*} \frac {a \log (\sin (e+f x))}{f}-\frac {b \log (\cos (e+f x))}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 3556
Rule 3706
Rubi steps
\begin {align*} \int \cot (e+f x) \left (a+b \tan ^2(e+f x)\right ) \, dx &=a \int \cot (e+f x) \, dx+b \int \tan (e+f x) \, dx\\ &=-\frac {b \log (\cos (e+f x))}{f}+\frac {a \log (\sin (e+f x))}{f}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 34, normalized size = 1.31 \begin {gather*} -\frac {b \log (\cos (e+f x))}{f}+\frac {a (\log (\cos (e+f x))+\log (\tan (e+f x)))}{f} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.13, size = 25, normalized size = 0.96
method | result | size |
derivativedivides | \(\frac {-b \ln \left (\cos \left (f x +e \right )\right )+a \ln \left (\sin \left (f x +e \right )\right )}{f}\) | \(25\) |
default | \(\frac {-b \ln \left (\cos \left (f x +e \right )\right )+a \ln \left (\sin \left (f x +e \right )\right )}{f}\) | \(25\) |
norman | \(\frac {a \ln \left (\tan \left (f x +e \right )\right )}{f}-\frac {\left (a -b \right ) \ln \left (1+\tan ^{2}\left (f x +e \right )\right )}{2 f}\) | \(35\) |
risch | \(-i x a +i x b -\frac {2 i a e}{f}+\frac {2 i b e}{f}+\frac {a \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-1\right )}{f}-\frac {\ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+1\right ) b}{f}\) | \(63\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.27, size = 33, normalized size = 1.27 \begin {gather*} -\frac {b \log \left (\sin \left (f x + e\right )^{2} - 1\right ) - a \log \left (\sin \left (f x + e\right )^{2}\right )}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 3.06, size = 49, normalized size = 1.88 \begin {gather*} \frac {a \log \left (\frac {\tan \left (f x + e\right )^{2}}{\tan \left (f x + e\right )^{2} + 1}\right ) - b \log \left (\frac {1}{\tan \left (f x + e\right )^{2} + 1}\right )}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] Leaf count of result is larger than twice the leaf count of optimal. 58 vs.
\(2 (22) = 44\).
time = 0.21, size = 58, normalized size = 2.23 \begin {gather*} \begin {cases} - \frac {a \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} + \frac {a \log {\left (\tan {\left (e + f x \right )} \right )}}{f} + \frac {b \log {\left (\tan ^{2}{\left (e + f x \right )} + 1 \right )}}{2 f} & \text {for}\: f \neq 0 \\x \left (a + b \tan ^{2}{\left (e \right )}\right ) \cot {\left (e \right )} & \text {otherwise} \end {cases} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.65, size = 34, normalized size = 1.31 \begin {gather*} \frac {a \log \left (\sin \left (f x + e\right )^{2}\right ) - b \log \left ({\left | \sin \left (f x + e\right )^{2} - 1 \right |}\right )}{2 \, f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 11.66, size = 36, normalized size = 1.38 \begin {gather*} \frac {a\,\ln \left (\mathrm {tan}\left (e+f\,x\right )\right )}{f}-\frac {\ln \left ({\mathrm {tan}\left (e+f\,x\right )}^2+1\right )\,\left (\frac {a}{2}-\frac {b}{2}\right )}{f} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________